import { createRouter, createWebHistory } from 'vue-router'
import Login from "../views/Login.vue"
import Index from "../views/Index.vue"
import Home from "../views/Home.vue"


const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path:"/login",
      name:"login",
      component: Login,
    },
    {
      path:"/",
      name:"index",
      component: Index,
      redirect: '/Home',
      children:[
        {
          path: '/Home',
          name: 'Home',
          component: Home
        },
        {
          path: '/Community',
          name: 'Community',
          component: import('../views/Community.vue')
        },
        {
          path: '/Message',
          name: 'Message',
          component: import('../views/Message.vue')
        },
        {
          path: '/Mine',
          name: 'Mine',
          component: import('../views/Mine.vue')
        },
      ]
    },

   
  ]
})

export default router
